Ir arriba
Información del artículo

Public perception on immigration and racial discrimination in Spain: a social media analysis using X data

B. Botas, J. Cifuentes, Y.A. Jiménez, M. Espinosa

Journal of Computational Social Science Vol. 9, nº. 1, pp. 25

Resumen:

The increasing use of social media, particularly X (formerly Twitter), has enabled citizens to openly share their views, making it a valuable arena for examining public perceptions of immigration and its intersections with racial discrimination and xenophobia. This study analyzes Spanish digital debates from January 2020 to January 2023 through a mixed methodology that combines text pre-processing, semantic filtering of keywords, topic modeling, and sentiment analysis. A five-topic solution obtained through Latent Dirichlet Allocation (LDA) captured the main dimensions of the discourse: (1) economic and political debates on immigration, (2) international migration and refugee contexts, (3) racism and social discrimination, (4) insults, stereotypes, and xenophobic framings, and (5) small boat arrivals and maritime management. Sentiment analysis using a transformer-based model (roBERTuito) revealed a strong predominance of negativity across all topics, with sharp spikes linked to major migration crises, humanitarian emergencies, and highly mediatized cultural events. Qualitative readings of representative posts further showed that negativity was often articulated through invasion metaphors, securitarian framings, satire, and ridicule, indicating that hostility was not merely reactive but embedded in broader economic, political, and cultural registers. These findings demonstrate that discriminatory discourse in Spain is event-driven, becoming particularly salient during crises and symbolic moments, and underline the persistent role of social media in amplifying racialized exclusion and partisan polarization.


Resumen divulgativo:

Debates en X en España ene 2020–ene 2023 sobre inmigración trataron sobre política/economía, refugiados, racismo, además de estereotipos xenófobos. Predominó tono negativo, con picos en crisis y eventos virales, amplificando polarización.


Palabras Clave: Social media · Discrimination · Immigration · Sentiment analysis · Topic modeling


Índice de impacto JCR-JIF y cuartil WoS: 2,300 - Q2 (2024)

Referencia DOI: DOI icon https://doi.org/10.1007/s42001-025-00459-8

Publicado en papel: 2026.

Publicado on-line: Enero 2026.



Cita:
B. Botas, J. Cifuentes, Y.A. Jiménez, M. Espinosa, "Public perception on immigration and racial discrimination in Spain: a social media analysis using X data", Journal of Computational Social Science, Vol. 9, nº. 1, pp. 25, 2026. [Online: Enero 2026] doi: 10.1007/s42001-025-00459-8

    Líneas de investigación:
  • Machine Learning y Analítica Avanzada
  • Inclusión social y vulnerabilidad
    Grupos de investigación:
  • Instituto de Investigación Tecnológica (IIT)
  • Innovación docente y Analytics (GIIDA)
    ODS:
  • Objetivo 10: Reducción de las desigualdades
  • Objetivo 16: Paz, justicias e instituciones sólidas